using System;
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class ToolManager : MonoBehaviour
{
    public GameObject ToolContent;
    public string fileName = "Tools";
    private ToolList toollist;
    private string ToolPath = "Prefabs/ToolPrefab";
    private int currentIndex;

    public void Start()
    {
        LoadTools();
    }

    public void LoadTools()
    {
        TextAsset jsonFile = Resources.Load<TextAsset>(fileName);

        if (jsonFile != null)
        {
            toollist = JsonUtility.FromJson<ToolList>(jsonFile.text);
            Debug.Log("Tool data loaded successfully! Count: " + toollist.tools.Count);
        }
    }
}